package micro.beauty.common.mvc.exception;
/**
* @Description:    通用异常
* @Author:         Liuliya
* @CreateDate:     2020/8/11 22:11
* @Version:        0.0.1
*/
public class CommonException extends RuntimeException{

    private int code;
    private String message;

    public CommonException() {
        // to do nothing
    }

    public CommonException(String message) {
        super(message);
        this.message = message;
    }

    public CommonException(String message, Throwable cause) {
        super(message, cause);
        this.message = message;
    }

    public CommonException(int code, String message) {
        super(message);
        this.code = code;
        this.message = message;
    }

    public CommonException(int code, String message, Throwable cause) {
        super(message, cause);
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
